The present invention relates to a program compiler and, more particularly, to a method of unrolling/optimizing a repetitive loop.
In a conventional method of consecutive access to the same memory bank by means of a loop, the execution time is undesirably prolonged because of repetitive processing by the loop. In order to minimize the execution time, the loop is optimized. For example, unroll/optimization of a DO loop in a FORTRAN compiler is performed by changing the incrementation value of the DO loop.
If, however, a DO loop is optimized by changing its incrementation value as in the conventional method, contention between memory banks may occur, resulting in an increase in execution time.